<div class='fui-page fui-page-current member-log-page'>
	<div class="fui-header">
        <div class="fui-header-left">
            <a class="back" ng-click='goback()'></a>
        </div>
        <div class="title">备货统计</div>
    </div>
    <div class='fui-content'>
		<div class="fui-tab fui-tab-success">
			<a ng-class="{'active':pagedata.params.type==1}" class="external" href="javascript:;" ng-click="pagedata.params.type=1;pagedata.get_list();">配送上门</a>
			<a ng-class="{'active':pagedata.params.type==2}" class="external" href="javascript:;" ng-click="pagedata.params.type=2;pagedata.get_list();">上门自提</a>
		</div>
		<div class="fui-tab-scroll" style="background:#fff">
			<div ng-repeat="t in pagedata.tabs" ng-class="{'item':1,'on':pagedata.params.key == t.key}" href="javascript:;" ng-click="pagedata.params.key=t.key;pagedata.get_list();">
			{{t.title}}
			</div>
		</div>
        <div class='content-empty' ng-show="!pagedata.list || pagedata.list.length<=0">
            <i class='fa fa-comment-o'></i><br/>暂时没有任何待配送商品!
        </div>
		<div style="padding:0 0.5rem">
        <div  class='fui-cell-group' ng-show="pagedata.list.length>0">
			<div class='title' style="font-size:0.85rem;padding:0.5rem;">
				<span class="label label-warning">商品总数：{{pagedata.goodsnum || 0}}件</span>
				<span class="label label-danger">配送单总数：{{pagedata.daylognum || 0}}单</span>
			</div>
			<div ng-repeat="item in pagedata.list" class="fui-cellone" style="padding:0.15rem 0.5rem">
							<div class="fui-cellone-info">
								{{item.title}}
							</div>
							<div ng-if="g.selespename" class="fui-cellone-info" style="color:red">
								{{item.selespename}}
							</div>
							<div class="fui-cellone-remark noremark">
								{{item.num}}件
							</div>
			</div>
			</div>
		</div>
    </div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
scope.pagedata.get_list=function(){
	scope.get('jy_peiorder/merch.beigoods//type='+scope.pagedata.params.type+'&key='+scope.pagedata.params.key,function(res){
		scope.pagedata.list=res.list;
		scope.pagedata.goodsnum=res.goodsnum
		scope.pagedata.daylognum=res.daylognum
		scope.$evalAsync();
	});
}
</script>